package org.jeecg.modules.demo.projectroom.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.modules.demo.projectroom.entity.ZnzfProjectType;
import org.jeecg.modules.demo.projectroom.mapper.ZnzfProjectTypeMapper;
import org.jeecg.modules.demo.projectroom.service.IZnzfProjectTypeService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import javax.annotation.Resource;

/**
 * @Description: 房屋报建性质表
 * @Author: jeecg-boot
 * @Date:   2022-04-01
 * @Version: V1.0
 */
@Service
public class ZnzfProjectTypeServiceImpl extends ServiceImpl<ZnzfProjectTypeMapper, ZnzfProjectType> implements IZnzfProjectTypeService {

    @Resource
    private ZnzfProjectTypeMapper znzfProjectTypeMapper;

    @Override
    public ZnzfProjectType searchByValue(String value) {
        LambdaQueryWrapper<ZnzfProjectType> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(ZnzfProjectType::getValue, value);
        return znzfProjectTypeMapper.selectOne(queryWrapper);
    }
}
